#ifndef RESULTLOGGER_H
#define RESULTLOGGER_H

#include <QObject>
#include <QList>
#include <QStringList>

class DotController;
class QStandardItemModel;

class ResultLogger : public QObject
{
Q_OBJECT
private:
    explicit ResultLogger(QObject *parent = 0);

public:
static ResultLogger *me();
signals:

public slots:
    void save();
    void showLog();

private:
    void restore();
    void addAResult(QStringList item);
    void populateResult(QStandardItemModel *pModel);
    void populateARow(QStandardItemModel *pModel,QStringList value,int nRow);
private:
    QList<QStringList> mResults;
    static const QString LogFileName;
    static const int MaxCol = 5;
    static ResultLogger *mpMe;

friend class DotController;
};

#endif // RESULTLOGGER_H
